package sim;

import java.awt.Color;
import java.awt.Shape;
import java.awt.geom.Point2D;

import obj.Edge;
import obj.Path;

public abstract class Vehicle {

	private double carAngle;
	private Point2D.Double currentPosition;
	private Point2D.Double endPosition;
	private String name;
	private Path path;
	private double x = 0;
	private double y = 0;
	private Vehicle leadVehicle;
	private double maxSpeed;
	private double currentSpeed;
	private Color color;
	private boolean leadVehicleAdded;
	private Edge currentEdge;
	private Edge prevEdge;

	public Edge getPrevEdge() {
		return prevEdge;
	}

	public void setPrevEdge(Edge prevEdge) {
		this.prevEdge = prevEdge;
	}

	public Edge getCurrentEdge() {
		return currentEdge;
	}

	public void setCurrentEdge(Edge currentEdge) {
		this.currentEdge = currentEdge;
	}

	public boolean isLeadVehicleAdded() {
		return leadVehicleAdded;
	}

	public void setLeadVehicleAdded(boolean leadVehicleAdded) {
		this.leadVehicleAdded = leadVehicleAdded;
	}

	public Color getColor() {
		return color;
	}

	public void setColor(Color color) {
		this.color = color;
	}

	public double getCurrentSpeed() {
		return currentSpeed;
	}

	public void setCurrentSpeed(double currentSpeed) {
		this.currentSpeed = currentSpeed;
	}

	public double getMaxSpeed() {
		return maxSpeed;
	}

	public void setMaxSpeed(double maxSpeed) {
		this.maxSpeed = maxSpeed;
	}

	public Vehicle getLeadVehicle() {
		return leadVehicle;
	}

	public void setLeadVehicle(Vehicle leadVehicle) {
		this.leadVehicle = leadVehicle;
	}

	public double getCarAngle() {
		return carAngle;
	}

	public void setCarAngle(double carAngle) {
		this.carAngle = carAngle;
	}

	public Point2D.Double getCurrentPosition() {
		return currentPosition;
	}

	public void setCurrentPosition(Point2D.Double currentPosition) {
		this.x = currentPosition.getX();
		this.y = currentPosition.getY();
		this.currentPosition = currentPosition;
	}

	public Point2D.Double getEndPosition() {
		return endPosition;
	}

	public void setEndPosition(Point2D.Double endPosition) {
		this.endPosition = endPosition;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Path getPath() {
		return path;
	}

	public void setPath(Path path) {
		this.path = path;
	}

	public double getX() {
		return x;
	}

	public void setX(double x) {
		this.x = x;
	}

	public double getY() {
		return y;
	}

	public void setY(double y) {
		this.y = y;
	}

	abstract void move(Point2D.Double point);

	abstract Shape getShape();

}
